package top.huhuiyu.teachproject.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.huhuiyu.teachproject.base.BaseResult;
import top.huhuiyu.teachproject.entity.TbUser;
import top.huhuiyu.teachproject.service.AuthService;

/**
 * 用户认证相关控制器
 *
 * @author 胡辉煜
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/user")
public class UserInfoController {

  private final AuthService authService;

  @PostMapping("")
  public BaseResult reg(@RequestBody TbUser user) {
    return authService.reg(user);
  }
}
